package com.singzi.testCase;

import org.junit.Test;

public class ThreadTest {


    final  void m(){

    }
    @Test
    public void test01() throws InterruptedException {
        Thread t = new Thread(new Runnable() {
            public void run() {
                try {
                    Thread.sleep(2000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("2");
            }
        });
        t.start();
        t.join();
        System.out.println("1");

    }
}
